package yt.demo.appcoresystem.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import yt.demo.appcommondb.base.BaseEntity;

@EqualsAndHashCode(callSuper = true)
@Data
@Schema(name = "SystemDept", description = "系统菜单")
public class SystemDept  extends BaseEntity<SystemDept> {

    @TableId
    @Schema(name = "id", description = "主键ID")
    @NotNull(groups = UpdateGroup.class,message = "id不能为空") // 更新时确保此字段不能为空
    private Long id;

    @NotNull(groups = {CreateGroup.class, UpdateGroup.class},message = "部门名称不能为空")
    @Schema(name = "name", description = "部门名称")
    private String name;

    @Schema(name = "parent_id", description = "父ID")
    private Long parentId;

    @Schema(name = "level", description = "组级集合")
    private String level;

    @Schema(name = "leader", description = "负责人")
    private String leader;

    @Schema(name = "phone", description = "联系电话")
    private String phone;

    @Schema(name = "email", description = "邮箱")
    private String email;

    @Schema(name = "status", description = "状态 (1正常 2停用)")
    private Integer status;

    @Schema(name = "sort", description = "排序")
    private Integer sort;

    @Schema(name = "remark", description = "备注")
    private String remark;

}
